package com.jh.pattern.singleton.hungry;

/**
 * @author JH_Wong
 * @projectName newforward
 * @title HungryStaticSingleton.java
 * @package com.jh.pattern.singleton.hungry
 * @description 饿汉静态块
 * @date 2019-05-10 12:52
 */
public class HungryStaticSingleton {

    private static HungryStaticSingleton hungryStaticSingleton = null;

    {
        hungryStaticSingleton = new HungryStaticSingleton();
    }

    private HungryStaticSingleton(){}

    public static HungryStaticSingleton getInstance() {
        return hungryStaticSingleton;
    }
}
